// components/Tabs/Tabs.js
Component({
  properties: {
    tabs: {
      type: Array,
      value: []
    }
  },
  data: {},
  methods: {
    handleItemTap(e) {
      // console.log(e.currentTarget.dataset)
      const {
        index
      } = e.currentTarget.dataset
      // 调用父组件方法,给他传个值
      this.triggerEvent('tabsItemChange', { index })
    }
  }
})